/*
 * Defines weixinagent interface. 
 */

namespace cpp weixinagent

enum ResponseCode 
{
    Success = 0,
    Error,
    KeyNotFound,
}

struct GetAccessTokenResponse
{
    1:ResponseCode tResponseCode,
    2:string sAccessToken,
	3:i32 iExpireTime
}

service WeixinAgent
{
    /**
     * Pings mapkeeper.
     *
     * @return Success - if ping was successful.
     *         Error - if ping failed.
     */
    ResponseCode Ping(),

    /**
     * //
     *
     * @param key //
     * @returns RecordResponse 
     *              responseCode - Ok 
     *                             KeyNotFound key doesn't exist.
     *                             Error on any other errors.
     *              value - value of the record.
     */
    GetAccessTokenResponse GetAccessToken(1:string sAppid, 2:string sSeceret ),

    /**
     * //
     *
     * @param key //
     * @param value //
     * @returns Ok 
     *          Error
     */
    ResponseCode sendtxt(1:string sAccessToken, 2:string sTxtMsg)
}
